package com.banksoft.cps.dao;

import com.banksoft.cps.bean.SaleOrder;
import com.banksoft.cps.bean.query.SaleOrderQuery;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * Created by rongzhao.zhu on 2018/1/2.
 */
@Repository
public interface SaleOrderDao {

    void insert(SaleOrder bean);

    void update(SaleOrder bean);


    SaleOrder findById(String id);

    List<SaleOrder> listByDeviceIdList(@Param("deviceIdList") List<String> deviceIdList,
                                       @Param("timeB") long timeB,
                                       @Param("timeE") long timeE);

    List<SaleOrder> list(SaleOrderQuery query);

    List<SaleOrder> listIdList(List<String> idList );

    long count(SaleOrderQuery query);

    List<SaleOrder>  needHandleSaleOrder(@Param("timeE") long timeE);

    void setCalcFlag(List<String> idList );

    void delete(String[] ids);
}
